package com.baichang.taoshunda.service.impl;

import com.baichang.taoshunda.dao.BussinessDao;
import com.baichang.taoshunda.dao.BussinessReplyDao;
import com.baichang.taoshunda.dao.GoodsCommentDao;
import com.baichang.taoshunda.service.BussinessReplyService;
import com.baichang.taoshunda.utils.ConvertTypeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class BussinessReplyServiceImpl implements BussinessReplyService {

    @Autowired
    private GoodsCommentDao goodsCommentDao;

    @Autowired
    private BussinessReplyDao bussinessReplyDao;

    /**
     * 查看商家评论列表
     *
     * @param bussId   商家编号
     * @param nowPage  当前页
     * @param pageSize 每页大小
     * @return
     */
    @Override
    public List<Map<String, Object>> findCommentList(Integer bussId, Integer nowPage, Integer pageSize) {
//        List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>();
        List<Map<String, Object>> comments = goodsCommentDao.findCommentList(bussId, nowPage, pageSize);
//        if (comments != null && comments.size() > 0) {
//            for(Map<String,Object> map:comments){
//                Integer id= ConvertTypeUtils.obj2Integer(map.get("id"));
//                List<Map<String,Object>>
//            }
//        }
        return comments;
    }
}
